<template>
  <div class="banner">
    <div class="banner-inner">
        <a-carousel :auto-play="true" class="carousel" animation-name="fade">
            <a-carousel-item v-for="item in carouselItem" :key="item.slogan">
                <div :key="item.slogan" class="carousel-item">
                    <div class="carousel-title">{{ item.slogan }}</div>
                    <div class="carousel-sub-title">{{ item.subSlogan }}</div>
                    <img class="carousel-image" :src="item.image" />
                </div>
            </a-carousel-item>
        </a-carousel>
    </div>
  </div>
</template>

<script setup>
import bannerImage from '../../../assets/login-banner.png';
import {computed} from "vue";

const carouselItem = computed(() => [
    {
        slogan: '海量专业问卷模板',
        subSlogan: '开箱即用的高质量模板，覆盖大多数典型问卷场景',
        image: bannerImage,
    },
    {
        slogan: '优秀的问卷编辑体验',
        subSlogan: '支持实时预览，轻松创建专业问卷',
        image: bannerImage,
    },
    {
        slogan: '高效数据收集分析',
        subSlogan: '实时数据统计，洞察数据背后的价值',
        image: bannerImage,
    },
]);

</script>

<style scoped>
.banner {
    display: flex;
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 768px) {
    .banner {
        display: none;
    }
}

.banner-inner {
    flex: 1;
    height: 100%;
}

.carousel {
    height: 100%;
}

.carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.carousel-title {
    color: var(--color-fill-1);
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
}

.carousel-sub-title {
    margin-top: 8px;
    color: var(--color-text-3);
    font-size: 14px;
    line-height: 22px;
}

.carousel-image {
    width: 320px;
    margin-top: 30px;
}

</style>
